﻿using Roton.Memory;
using Roton.ZZT;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Roton.Wrapper
{
    class StringArrayWrapper : IStringArray
    {
        protected int length;
        protected int offset;
        protected Segment segment;

        public StringArrayWrapper(int offset, int stringLength, Segment segment)
        {
            this.length = stringLength + 1;
            this.offset = offset;
            this.segment = segment;
        }

        public IString this[int index]
        {
            get
            {
                return new ByteStringWrapper((index * length) + offset, segment);
            }
        }
    }
}
